package com.example.phoenixshop.bean;

import java.util.Date;

public class User {
    /**
     * 用户id
     */
    private Long id;
    /**
     * 用户账号
     */
    private String account;
    /**
     * 用户密码
     */
    private String password;
    /**
     * 用户名
     */
    private String userName;
    /**
     * 用户角色，0为买家，1为卖家
     */
    private Byte role;
    /**
     * 上一次登录时间
     */
    private Date lastLoginTime;
    /**
     * 注册时间
     */
    private Date registerTime;

    public User(Long id, String account, String password, String userName, Byte role, Date lastLoginTime, Date registerTime) {
        this.id = id;
        this.account = account;
        this.password = password;
        this.userName = userName;
        this.role = role;
        this.lastLoginTime = lastLoginTime;
        this.registerTime = registerTime;
    }

    public User() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account == null ? null : account.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public Byte getRole() {
        return role;
    }

    public void setRole(Byte role) {
        this.role = role;
    }

    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }
}